<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html {
            height: 100%;
        }
        body {
            padding: 0;
            margin: 0;
            height: 100%;
        }
        .container {
            height: 100%;
            display: flex;
            flex-direction: column;
        }
        .header, .footer {
            min-height: 100px;
            background: red;
        }
        .main {
            flex: 1;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header"></div>
        <div class="main">
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>
            <p>1</p>

        </div>
        <div class="footer"></div>
    </div>
</body>
</html>